Platform Explorer / Nuxeo Platform 2023.9

Operation Document.ResetSchema (Reset Schema)

Description

Reset all properties for a given schema or xpath. If saveDocument is true, the document is saved. If save is true, the session is saved (setting save to true and saveDocument to false has no effect, the session will not be saved).

WARNING: Default values are true for both saveDocument and save, which means the document is saved by default. saveDocument must be set to false when the operation is used in the context of an event that will fail if the document is saved (empty document created, about to create, before modification, ...).

Operation id Document.ResetSchema
Category Document
Label Reset Schema
Requires
Since

Parameters

Name Description Type Required Default value
save boolean no true 
saveDocument boolean no true 
schema string no  
xpath string no  

Signature

Inputs document, documents
Outputs document, documents

Implementation Information

Implementation Class Class: org.nuxeo.ecm.automation.core.operations.document.ResetSchema
Contributing Component org.nuxeo.ecm.core.automation.coreContrib

JSON Definition

{
  "id" : "Document.ResetSchema",
  "label" : "Reset Schema",
  "category" : "Document",
  "requires" : null,
  "description" : "Reset all properties for a given schema or xpath. If saveDocument is true, the document is saved. If save is true, the session is saved (setting save to true and saveDocument to false has no effect, the session will not be saved).<p>WARNING: Default values are true for both saveDocument and save, which means the document is saved by default. saveDocument must be set to false when the operation is used in the context of an event that will fail if the document is saved (empty document created, about to create, before modification, ...).</p>",
  "url" : "Document.ResetSchema",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "save",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "true" ]
  }, {
    "name" : "saveDocument",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "true" ]
  }, {
    "name" : "schema",
    "description" : null,
    "type" : "string",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "xpath",
    "description" : null,
    "type" : "string",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  } ]
}